home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
oscar
/
snac_writer.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
9KB
|
247 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
from __future__ import with_statement
if __name__ == '__main__':
import sys
import os
import os.path as os
path = os.path.join(sys.path[0], 'snac')
def write(snacs):
for fam, d in snacs.iteritems():
filename = os.path.join(path, 'family_x%02x.py' % fam)
try:
f = _[2]
for sub, desc in sorted(d.items()):
if type(sub) is int:
s = "\ndef x%(fam)02x_x%(sub)02x(o, sock, data):\n '''\n SNAC (x%(fam)x, x%(sub)x): %(desc)s\n\n reference: U{http://iserverd.khstu.ru/oscar/snac_%(fam)02x_%(sub)02x.html}\n '''\n raise NotImplementedError\n "
f.write(s % dict(fam = fam, sub = sub, desc = desc))
continue
open(filename, 'w')
f.write('\nx%02x_%s="%s"' % (fam, sub, desc))
finally:
pass
snacs = {
1: {
'name': 'Generic',
1: 'Generic Family Error',
2: 'Client ready',
3: 'Server ready',
4: 'New service request',
5: 'Service redirect',
6: 'Rate limit request',
7: 'Rate limit information',
8: 'Rate info acknowledgement',
9: "0x1, 0x9: Server deleted a rate group and you didn't handle it",
10: 'Rate info change',
11: 'Server pause',
12: 'Client pause ack',
13: 'Server resume',
14: 'Request self info',
15: 'Self info reply',
16: "0x1, 0x10: You've been eviled!",
17: 'Set idle time',
18: 'Server migration notice and information',
19: 'Got message of the day',
20: 'Set privacy flags',
21: 'Well-known URLs',
22: 'NOP (keep-alive packet)',
23: 'Request server services versions',
24: 'Server service versions response',
30: 'Set status/location info (also for direct connect info)',
31: 'Evil AIM prove yourself packet',
32: 'Response to prove yourself',
33: 'Extended status info (buddy icon)' },
2: {
'name': 'Location',
1: 'Location Family Error',
2: 'Request limitation params for Location group',
3: 'Location limitations response',
4: 'Set user info',
5: 'Request user info',
6: 'Requested User information',
7: 'Watcher sub request (??)',
8: 'Watcher notification',
9: 'Request to Update directory info',
10: 'Reply to update directory info',
11: 'Unknown info request',
12: 'Unknown info response (may contain tlv)',
15: 'Update user directory interests',
16: 'User directory interest reply',
21: 'User info query' },
3: {
'name': 'Buddy List management',
1: 'Buddy List management Family Error',
2: 'Request BLM params',
3: 'BLM limits response',
4: 'add buddy to list',
5: 'remove buddy from list',
6: 'query for list of watchers (supported?)',
7: 'watcher list response',
8: 'watcher sub request (wtf is this?)',
9: 'watcher notification',
10: 'Notification rejected!',
11: 'Oncoming buddy',
12: 'Offgoing buddy' },
4: {
'name': 'ICBM',
1: 'ICBM Family Error',
2: 'Set ICBM params',
3: 'Reset ICBM params',
4: 'Request ICBM params',
5: 'Messaging limits',
6: 'Outgoing message',
7: 'Incoming message',
8: 'Evil request',
9: 'Server evil ack',
10: 'Msg not delivered',
11: 'client/server message error (or data!)',
12: 'Server message ack',
20: 'MTN' },
5: {
'name': 'ads - deprecated',
1: 'ads Family Error',
2: 'Request ads',
3: 'Ads response' },
6: {
'name': 'Invite',
1: 'Invite Family Error',
2: 'Invite a friend',
3: 'Invitation ack' },
7: {
'name': 'Admin - this seems to be down',
1: 'Admin Family Error',
2: 'Request account info',
3: 'Requested account info',
4: 'Request change account info',
5: 'Change account info ack',
6: 'Account confirm request',
7: 'account confirm response',
8: 'account delete request',
9: 'Account delete ack' },
8: {
'name': 'Popup',
1: 'Popup Family Error',
2: 'Display popup' },
9: {
'name': 'Privacy management',
1: 'Privacy management Family Error',
2: 'Request privacy params',
3: 'Privacy limits response',
4: 'Set group permissions',
5: 'Add to visible list',
6: 'Delet from visible list',
7: 'Add to invisible list',
8: 'Delete from invisible list',
9: 'Service error',
10: 'Add to visible(?)',
11: 'Delete from visible(?)' },
10: {
'name': 'User lookup',
1: 'User lookup Family Error',
2: 'Search by email',
3: 'Search response' },
11: {
'name': 'Usage stats',
1: 'Usage stats Family Error',
2: 'Set minimum report interval',
3: 'Usage stats report',
4: 'Stats report ack' },
12: {
'name': 'Translation - deprecated',
1: 'Translation Family Error',
2: 'client translate request',
3: 'translate response' },
13: {
'name': 'Chat nav',
1: 'Chat nav Family Error',
2: 'Request limits',
3: 'Request exchange info',
4: 'Request room info',
5: 'Request extended room info',
6: 'Request member list',
7: 'Search for room',
8: 'Create room',
9: 'Chat navigation info' },
14: {
'name': 'Chat',
1: 'Chat Family Error',
2: 'Chat room info update',
3: 'User joined chat room',
4: 'User left chat room',
5: 'Outgoing chat message',
6: 'Incoming chat message',
7: 'Evil request',
8: 'Evil response',
9: 'Chat error or data',
38: 'Chat room info?',
48: 'Room list?' },
15: {
'name': 'Directory user search',
1: 'Directory user search Family Error',
2: 'Client search request',
3: 'Search reply',
4: 'Request interests list',
5: 'Interest list response' },
16: {
'name': 'SSBI',
1: 'SSBI Family Error',
2: 'Upload your icon',
3: 'Upload buddy icon reply',
4: 'Request buddy icon',
5: 'Requested buddy icon',
6: 'SNAC(0x10, 0x06)',
7: 'SNAC(0x10, 0x07)' },
19: {
'name': 'SSI',
1: 'SSI Family Error',
2: 'Request SSI params',
3: 'SSI Limitations',
4: 'Request contact list (first time)',
5: 'Contact list request',
6: 'Server contact list reply',
7: 'Request contact list (after login)',
8: 'SSI add item',
9: 'SSI modify item',
10: 'SSI delete item',
14: 'SSI acknowledgement',
15: 'client local SSI is up-to-date',
17: 'Contact edit start',
18: 'Contact edit end',
20: 'Grant future authorization to client',
21: 'Future authorization granted',
22: 'Delete yourself from another list (supported?)',
24: 'Send authorization request',
25: 'Authorization request ack',
26: 'Send authorization reply',
27: 'Authorization reply ack',
28: '"You were added" message' },
21: {
'name': 'ICQ extensions',
1: 'ICQ extensions Family Error',
2: 'Meta info request',
3: 'Meta info response' },
23: {
'name': 'Authorization',
1: 'Authorization Family Error',
2: 'Client login request (md5)',
3: 'Server login response (md5)',
4: 'Request new screen name',
5: 'New screen name response',
6: 'Client signon request',
7: 'Server logon response',
10: 'Server SecureID request',
11: 'Client SecureID response' },
133: {
'name': 'Broadcast',
1: 'Broadcast Family Error',
2: 'Send broadcast message to server',
3: 'Server broadcast reply' } }
write(snacs)